package com.dime.physical.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dime.physical.mapper.DimeMaincheckharmabnormalcombMapper;
import com.dime.physical.domain.DimeMaincheckharmabnormalcomb;
import com.dime.physical.service.IDimeMaincheckharmabnormalcombService;

/**
 * 危害异常项目Service业务层处理
 * 
 * @author Tiny
 * @date 2023-10-17
 */
@Service
public class DimeMaincheckharmabnormalcombServiceImpl implements IDimeMaincheckharmabnormalcombService 
{
    @Autowired
    private DimeMaincheckharmabnormalcombMapper dimeMaincheckharmabnormalcombMapper;

    /**
     * 查询危害异常项目
     * 
     * @param id 危害异常项目主键
     * @return 危害异常项目
     */
    @Override
    public DimeMaincheckharmabnormalcomb selectDimeMaincheckharmabnormalcombById(String id)
    {
        return dimeMaincheckharmabnormalcombMapper.selectDimeMaincheckharmabnormalcombById(id);
    }

    /**
     * 查询危害异常项目列表
     * 
     * @param dimeMaincheckharmabnormalcomb 危害异常项目
     * @return 危害异常项目
     */
    @Override
    public List<DimeMaincheckharmabnormalcomb> selectDimeMaincheckharmabnormalcombList(DimeMaincheckharmabnormalcomb dimeMaincheckharmabnormalcomb)
    {
        return dimeMaincheckharmabnormalcombMapper.selectDimeMaincheckharmabnormalcombList(dimeMaincheckharmabnormalcomb);
    }

    /**
     * 新增危害异常项目
     * 
     * @param dimeMaincheckharmabnormalcomb 危害异常项目
     * @return 结果
     */
    @Override
    public int insertDimeMaincheckharmabnormalcomb(DimeMaincheckharmabnormalcomb dimeMaincheckharmabnormalcomb)
    {
        dimeMaincheckharmabnormalcomb.setCreateTime(DateUtils.getNowDate());
        return dimeMaincheckharmabnormalcombMapper.insertDimeMaincheckharmabnormalcomb(dimeMaincheckharmabnormalcomb);
    }

    /**
     * 修改危害异常项目
     * 
     * @param dimeMaincheckharmabnormalcomb 危害异常项目
     * @return 结果
     */
    @Override
    public int updateDimeMaincheckharmabnormalcomb(DimeMaincheckharmabnormalcomb dimeMaincheckharmabnormalcomb)
    {
        dimeMaincheckharmabnormalcomb.setUpdateTime(DateUtils.getNowDate());
        return dimeMaincheckharmabnormalcombMapper.updateDimeMaincheckharmabnormalcomb(dimeMaincheckharmabnormalcomb);
    }

    /**
     * 批量删除危害异常项目
     * 
     * @param ids 需要删除的危害异常项目主键
     * @return 结果
     */
    @Override
    public int deleteDimeMaincheckharmabnormalcombByIds(String[] ids)
    {
        return dimeMaincheckharmabnormalcombMapper.deleteDimeMaincheckharmabnormalcombByIds(ids);
    }

    /**
     * 删除危害异常项目信息
     * 
     * @param id 危害异常项目主键
     * @return 结果
     */
    @Override
    public int deleteDimeMaincheckharmabnormalcombById(String id)
    {
        return dimeMaincheckharmabnormalcombMapper.deleteDimeMaincheckharmabnormalcombById(id);
    }
}
